function menuClick() {
    number = number+1
    order_num = order_num+1
    custom.push({number:number,order_num:order_num,type:2})
    for(let index in custom){
        if(custom[index].number == number){
            custom[index].ionrange_1 = 0
            custom[index].ionrange_2 = 100
            custom[index].ionrange_3 = 200
            custom[index].img = []
            var imgList1 = {imgNumber:1,imgeSrc:'',urlType:0,urlId:0,urlTitle:''}
            var imgList2 = {imgNumber:2,imgeSrc:'',urlType:0,urlId:0,urlTitle:''}
            custom[index].img.push(imgList1)
            custom[index].img.push(imgList2)
        }
    }
    var html =' <div class="form-group draggable dropped ui-draggable" id="dropped_'+number+'" data-number="'+number+'">\n' +
        '  <div class="optionsClass">\n' +
        '                                            <ul>\n' +
        '                                                <li id="Shoiung">商品</li>\n' +
        '                                                <li id="Shoiung1">参数</li>\n' +
        '                                                <li id="Shoiung2">详情</li>\n' +
        '                                                <li id="Shoiung3">评价</li>\n' +
        '                                            </ul>\n' +
        '                                        </div>\n' +
    '                                        </div>'
    var img = $('#field_image').html()
    //隐藏所有
    $('#sortable_leve').find('div[class="level_number"]').css("display","none")
    var level = '<div class="level_number" style="width: 90%; position: relative" id="level_'+number+'" data-number="'+number+'">\n' +
        '<i style="position: absolute;right:-70px; top:-9px;font-size: 25px; cursor: pointer" class="fa fa-times LunboListClick"></i>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>上边距</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_1" data-number="'+number+'" ></div>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>宽度调试</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_2" data-number="'+number+'" ></div>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>高度调试</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_3" data-number="'+number+'"></div>\n' +
        '<div><span>选择颜色：</span><input type="text" class="form-control colorpicker-demo1" value="#5367ce" /></div>\n' +
        '<div style="display: flex;justify-content: start; margin-top: 10px; align-items: center">\n' +
        '            <span style="font-size: 15px;color:#555; margin-right: 5px">商品文字：</span>\n' +
        '            <input id="Qinshangpin" style="max-width: 40%;" type="text" class="form-control" placeholder="商品" />\n' +
        '        </div>\n' +
        '        <div style="display: flex;justify-content: start; margin-top: 10px;  align-items: center">\n' +
        '            <span style="font-size: 15px;color:#555; margin-right: 5px">参数文字：</span>\n' +
        '            <input id="Qinshangpin1" style="max-width: 40%;" type="text" class="form-control" placeholder="参数" />\n' +
        '        </div>\n' +
        '        <div style="display: flex;justify-content: start; margin-top: 10px;  align-items: center">\n' +
        '            <span style="font-size: 15px;color:#555; margin-right: 5px">详情文字：</span>\n' +
        '            <input id="Qinshangpin2" style="max-width: 40%;" type="text" class="form-control" placeholder="详情" />\n' +
        '        </div>\n' +
        '        <div style="display: flex;justify-content: start; margin-top: 10px;  align-items: center">\n' +
        '            <span style="font-size: 15px;color:#555; margin-right: 5px">评价文字：</span>\n' +
        '            <input id="Qinshangpin3" style="max-width: 40%;" type="text" class="form-control" placeholder="评价" />\n' +
        '        </div>\n' +
        '                            </div>\n' +
        '                        </div>'

    $('#sortable').append(html);
    $('#sortable_leve').append(level);

    $(".ionrange_1").ionRangeSlider({
        min: 0,
        max: 100,
        type: "single",
        step: 1,
        postfix: "px",
        prettify: false,
        hasGrid: true,
        from: 0,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div").css("margin-top",obj.fromNumber)
            console.log('123', $("#dropped_"+obj.input.context.dataset.number+""))
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_1 = obj.fromNumber
                }
            }

        }
    });
    $(".ionrange_2").ionRangeSlider({
        min: 0,
        max: 100,
        type: "single",
        step: 1,
        postfix: "%",
        prettify: false,
        hasGrid: true,
        from: 100,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div").css("width",obj.fromNumber+"%")
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_2 = obj.fromNumber
                }
            }

        }
    });
    $(".ionrange_3").ionRangeSlider({
        min: 0,
        max: 100,
        type: "single",
        step: 1,
        postfix: "px",
        prettify: false,
        hasGrid: true,
        from: 40,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='optionsClass']").css("height",obj.fromNumber+"px")
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='optionsClass']").css("line-height", obj.fromNumber+"px")
            console.log('13', $("#dropped_"+obj.input.context.dataset.number+""))
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_3 = obj.fromNumber
                }
            }
        }
    });
    $("#Qinshangpin").bind("input propertychange",function(event){
        if($("#Qinshangpin").val() == ''){
            x.innerHTML = '商品'
        }else{
            x = document.getElementById("Shoiung")
            x.innerHTML = $("#Qinshangpin").val()
        }
    });
    $("#Qinshangpin1").bind("input propertychange",function(event){
        if($("#Qinshangpin1").val() == ''){
            x.innerHTML = '参数'
        }else{
            x = document.getElementById("Shoiung1")
            x.innerHTML = $("#Qinshangpin1").val()
        }
    });
    $("#Qinshangpin2").bind("input propertychange",function(event){
        if($("#Qinshangpin2").val() == ''){
            x.innerHTML = '详情'
        }else{
            x = document.getElementById("Shoiung2")
            x.innerHTML = $("#Qinshangpin2").val()
        }
    });
    $("#Qinshangpin3").bind("input propertychange",function(event){
        if($("#Qinshangpin3").val() == ''){
            x.innerHTML = '评价'
        }else{
            x = document.getElementById("Shoiung3")
            x.innerHTML = $("#Qinshangpin3").val()
        }
    });

}
$(document).ready(function () {
    $('.colorpicker-demo1').colorpicker();
})
